let person = {
    name : 'aa',
    age:18,
    like:{
        n:'running'
    }
}

function shallow(obj) {
    let res = {}
    for(let key in obj){
        if (obj.hasOwnProperty) {
            res[key] = obj[key]
        }
     
    }

    return res
}

console.log(shallow(person));
